let dayjs = require("dayjs");
const date1 = dayjs("2022-01-01");
const date2 = dayjs("2022-02-01");
// const date3 = dayjs("2022-01-01");

const isAfter = date1.isAfter(date2);   //date2日期是否在date1之后
const isBefore = date1.isBefore(date2); //date2日期是否在date2之前
const isSame = date1.isSame(date2);  //date1和date是否相等
console.log(isAfter);  //false
console.log(isBefore); //true
console.log(isSame);   //false
